package com.github.lee.mvvm.core.ui.web

import android.os.Handler
import android.os.Looper
import java.lang.ref.WeakReference

open class WebHandler(activity: BaseWebViewActivity<*>) : Handler(Looper.getMainLooper()) {

    private val weakReference = WeakReference(activity)

    private val activity
        get() = weakReference.get()


    fun setLoadProgress(progress:Int) {
        activity?.loadProgress?.set(progress)
    }


}